extends Node
class_name Buffer
enum {ON_ROUND_START,ON_ACTION,ONE_TIME_ONLY}
const BUFFER_UI = preload("res://scenes/buffer_ui.tscn")
var params = []
var cur_round:int = 1:
	set(value):
		cur_round = value
		buffer_ui.cur_round = value
var max_round:int:
	set(value):
		max_round = value
var id:String #根据ID在data.buffers中找到对应的buffer信息
var buffer_ui:Node
 #{
	#"id": "frostbite",
	#"buffer_name": "冻伤",
	#"descriptions": "冻伤会导致目标的体温急剧下降，造成持续的冷伤害 ",
	#"effect": "每回合造成%s点冰冻伤害",
	#"triggle": 0,
	#"params": [
		#3,
		#50
	#]
#}
func _init(_id:String,_params:Array) -> void:
	buffer_ui = BUFFER_UI.instantiate()
	id = _id
	params = _params
	max_round = int(params[0])
	cur_round = int(params[0])
	buffer_ui.buffer = self
	buffer_ui.cur_round = cur_round

# 生产效果
func apply(_character:Character) -> void:
	pass

# 移除状态
func remove(_character:Character) -> void:
	pass
